﻿/**  版本信息模板在安装目录下，可自行修改。
* TJ_SellInfoByYear.cs
*
* 功 能： N/A
* 类 名： TJ_SellInfoByYear
*
* Ver    变更日期             负责人  变更内容
* ───────────────────────────────────
* V0.01  2015/1/15 10:26:16   N/A    初版
*
* Copyright (c) 2012 Maticsoft Corporation. All rights reserved.
*┌──────────────────────────────────┐
*│　此技术信息为本公司机密信息，未经本公司书面同意禁止向第三方披露．　│
*│　版权所有：动软卓越（北京）科技有限公司　　　　　　　　　　　　　　│
*└──────────────────────────────────┘
*/
using DBUtil;
using Function;
using Model;
using Model.Permission;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;

namespace DAL
{
	/// <summary>
	/// 数据访问类:TJ_SellInfoByYear
	/// </summary>
	public partial class TJ_SellInfoByYearDAL
	{
         DbHelperSQLP DbHelperSQL = new DbHelperSQLP(PubConstant.JHShop);
         public TJ_SellInfoByYearDAL()
		{}
         #region  BasicMethod
         /// <summary>
         /// 是否存在该记录
         /// </summary>
         public bool Exists(long id)
         {
             StringBuilder strSql = new StringBuilder();
             strSql.Append("select count(1) from TJ_SellInfoByYear");
             strSql.Append(" where id=@id");
             SqlParameter[] parameters = {
					new SqlParameter("@id", SqlDbType.BigInt)
			};
             parameters[0].Value = id;

             return DbHelperSQL.Exists(strSql.ToString(), parameters);
         }


         /// <summary>
         /// 增加一条数据
         /// </summary>
         public long Add(TJ_SellInfoByYear model)
         {
             StringBuilder strSql = new StringBuilder();
             strSql.Append("insert into TJ_SellInfoByYear(");
             strSql.Append("ShopID,StatYear,SellNum,SellMoney,SellInCome,SellBackNum,SellBackMoney,SellPay,LargeNum,LargeMoney,LargeInCome,LargeBackOrderNum,LargeBackOrderMoney,LargePay,SendNum,SendMoney,SendInCome,SendBackNum,SendBackMoney,SendPay,TempOrderNum,TempOrderMoney,AllOrderMoney,AllInCome,AllBackMoney,AllPay,InCome,Note)");
             strSql.Append(" values (");
             strSql.Append("@ShopID,@StatYear,@SellNum,@SellMoney,@SellInCome,@SellBackNum,@SellBackMoney,@SellPay,@LargeNum,@LargeMoney,@LargeInCome,@LargeBackOrderNum,@LargeBackOrderMoney,@LargePay,@SendNum,@SendMoney,@SendInCome,@SendBackNum,@SendBackMoney,@SendPay,@TempOrderNum,@TempOrderMoney,@AllOrderMoney,@AllInCome,@AllBackMoney,@AllPay,@InCome,@Note)");
             strSql.Append(";select @@IDENTITY");
             SqlParameter[] parameters = {
					new SqlParameter("@ShopID", SqlDbType.Int,4),
					new SqlParameter("@StatYear", SqlDbType.VarChar,4),
					new SqlParameter("@SellNum", SqlDbType.Int,4),
					new SqlParameter("@SellMoney", SqlDbType.Decimal,9),
					new SqlParameter("@SellInCome", SqlDbType.Decimal,9),
					new SqlParameter("@SellBackNum", SqlDbType.Int,4),
					new SqlParameter("@SellBackMoney", SqlDbType.Decimal,9),
					new SqlParameter("@SellPay", SqlDbType.Decimal,9),
					new SqlParameter("@LargeNum", SqlDbType.Int,4),
					new SqlParameter("@LargeMoney", SqlDbType.Decimal,9),
					new SqlParameter("@LargeInCome", SqlDbType.Decimal,9),
					new SqlParameter("@LargeBackOrderNum", SqlDbType.Int,4),
					new SqlParameter("@LargeBackOrderMoney", SqlDbType.Decimal,9),
					new SqlParameter("@LargePay", SqlDbType.Decimal,9),
					new SqlParameter("@SendNum", SqlDbType.Int,4),
					new SqlParameter("@SendMoney", SqlDbType.Decimal,9),
					new SqlParameter("@SendInCome", SqlDbType.Decimal,9),
					new SqlParameter("@SendBackNum", SqlDbType.Int,4),
					new SqlParameter("@SendBackMoney", SqlDbType.Decimal,9),
					new SqlParameter("@SendPay", SqlDbType.Decimal,9),
					new SqlParameter("@TempOrderNum", SqlDbType.Int,4),
					new SqlParameter("@TempOrderMoney", SqlDbType.Decimal,9),
					new SqlParameter("@AllOrderMoney", SqlDbType.Decimal,9),
					new SqlParameter("@AllInCome", SqlDbType.Decimal,9),
					new SqlParameter("@AllBackMoney", SqlDbType.Decimal,9),
					new SqlParameter("@AllPay", SqlDbType.Decimal,9),
					new SqlParameter("@InCome", SqlDbType.Decimal,9),
					new SqlParameter("@Note", SqlDbType.NText)};
             parameters[0].Value = model.ShopID;
             parameters[1].Value = model.StatYear;
             parameters[2].Value = model.SellNum;
             parameters[3].Value = model.SellMoney;
             parameters[4].Value = model.SellInCome;
             parameters[5].Value = model.SellBackNum;
             parameters[6].Value = model.SellBackMoney;
             parameters[7].Value = model.SellPay;
             parameters[8].Value = model.LargeNum;
             parameters[9].Value = model.LargeMoney;
             parameters[10].Value = model.LargeInCome;
             parameters[11].Value = model.LargeBackOrderNum;
             parameters[12].Value = model.LargeBackOrderMoney;
             parameters[13].Value = model.LargePay;
             parameters[14].Value = model.SendNum;
             parameters[15].Value = model.SendMoney;
             parameters[16].Value = model.SendInCome;
             parameters[17].Value = model.SendBackNum;
             parameters[18].Value = model.SendBackMoney;
             parameters[19].Value = model.SendPay;
             parameters[20].Value = model.TempOrderNum;
             parameters[21].Value = model.TempOrderMoney;
             parameters[22].Value = model.AllOrderMoney;
             parameters[23].Value = model.AllInCome;
             parameters[24].Value = model.AllBackMoney;
             parameters[25].Value = model.AllPay;
             parameters[26].Value = model.InCome;
             parameters[27].Value = model.Note;

             object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
             if (obj == null)
             {
                 return 0;
             }
             else
             {
                 return Convert.ToInt64(obj);
             }
         }
         /// <summary>
         /// 更新一条数据
         /// </summary>
         public bool Update(TJ_SellInfoByYear model)
         {
             StringBuilder strSql = new StringBuilder();
             strSql.Append("update TJ_SellInfoByYear set ");
             strSql.Append("ShopID=@ShopID,");
             strSql.Append("StatYear=@StatYear,");
             strSql.Append("SellNum=@SellNum,");
             strSql.Append("SellMoney=@SellMoney,");
             strSql.Append("SellInCome=@SellInCome,");
             strSql.Append("SellBackNum=@SellBackNum,");
             strSql.Append("SellBackMoney=@SellBackMoney,");
             strSql.Append("SellPay=@SellPay,");
             strSql.Append("LargeNum=@LargeNum,");
             strSql.Append("LargeMoney=@LargeMoney,");
             strSql.Append("LargeInCome=@LargeInCome,");
             strSql.Append("LargeBackOrderNum=@LargeBackOrderNum,");
             strSql.Append("LargeBackOrderMoney=@LargeBackOrderMoney,");
             strSql.Append("LargePay=@LargePay,");
             strSql.Append("SendNum=@SendNum,");
             strSql.Append("SendMoney=@SendMoney,");
             strSql.Append("SendInCome=@SendInCome,");
             strSql.Append("SendBackNum=@SendBackNum,");
             strSql.Append("SendBackMoney=@SendBackMoney,");
             strSql.Append("SendPay=@SendPay,");
             strSql.Append("TempOrderNum=@TempOrderNum,");
             strSql.Append("TempOrderMoney=@TempOrderMoney,");
             strSql.Append("AllOrderMoney=@AllOrderMoney,");
             strSql.Append("AllInCome=@AllInCome,");
             strSql.Append("AllBackMoney=@AllBackMoney,");
             strSql.Append("AllPay=@AllPay,");
             strSql.Append("InCome=@InCome,");
             strSql.Append("Note=@Note");
             strSql.Append(" where id=@id");
             SqlParameter[] parameters = {
					new SqlParameter("@ShopID", SqlDbType.Int,4),
					new SqlParameter("@StatYear", SqlDbType.VarChar,4),
					new SqlParameter("@SellNum", SqlDbType.Int,4),
					new SqlParameter("@SellMoney", SqlDbType.Decimal,9),
					new SqlParameter("@SellInCome", SqlDbType.Decimal,9),
					new SqlParameter("@SellBackNum", SqlDbType.Int,4),
					new SqlParameter("@SellBackMoney", SqlDbType.Decimal,9),
					new SqlParameter("@SellPay", SqlDbType.Decimal,9),
					new SqlParameter("@LargeNum", SqlDbType.Int,4),
					new SqlParameter("@LargeMoney", SqlDbType.Decimal,9),
					new SqlParameter("@LargeInCome", SqlDbType.Decimal,9),
					new SqlParameter("@LargeBackOrderNum", SqlDbType.Int,4),
					new SqlParameter("@LargeBackOrderMoney", SqlDbType.Decimal,9),
					new SqlParameter("@LargePay", SqlDbType.Decimal,9),
					new SqlParameter("@SendNum", SqlDbType.Int,4),
					new SqlParameter("@SendMoney", SqlDbType.Decimal,9),
					new SqlParameter("@SendInCome", SqlDbType.Decimal,9),
					new SqlParameter("@SendBackNum", SqlDbType.Int,4),
					new SqlParameter("@SendBackMoney", SqlDbType.Decimal,9),
					new SqlParameter("@SendPay", SqlDbType.Decimal,9),
					new SqlParameter("@TempOrderNum", SqlDbType.Int,4),
					new SqlParameter("@TempOrderMoney", SqlDbType.Decimal,9),
					new SqlParameter("@AllOrderMoney", SqlDbType.Decimal,9),
					new SqlParameter("@AllInCome", SqlDbType.Decimal,9),
					new SqlParameter("@AllBackMoney", SqlDbType.Decimal,9),
					new SqlParameter("@AllPay", SqlDbType.Decimal,9),
					new SqlParameter("@InCome", SqlDbType.Decimal,9),
					new SqlParameter("@Note", SqlDbType.NText),
					new SqlParameter("@id", SqlDbType.BigInt,8)};
             parameters[0].Value = model.ShopID;
             parameters[1].Value = model.StatYear;
             parameters[2].Value = model.SellNum;
             parameters[3].Value = model.SellMoney;
             parameters[4].Value = model.SellInCome;
             parameters[5].Value = model.SellBackNum;
             parameters[6].Value = model.SellBackMoney;
             parameters[7].Value = model.SellPay;
             parameters[8].Value = model.LargeNum;
             parameters[9].Value = model.LargeMoney;
             parameters[10].Value = model.LargeInCome;
             parameters[11].Value = model.LargeBackOrderNum;
             parameters[12].Value = model.LargeBackOrderMoney;
             parameters[13].Value = model.LargePay;
             parameters[14].Value = model.SendNum;
             parameters[15].Value = model.SendMoney;
             parameters[16].Value = model.SendInCome;
             parameters[17].Value = model.SendBackNum;
             parameters[18].Value = model.SendBackMoney;
             parameters[19].Value = model.SendPay;
             parameters[20].Value = model.TempOrderNum;
             parameters[21].Value = model.TempOrderMoney;
             parameters[22].Value = model.AllOrderMoney;
             parameters[23].Value = model.AllInCome;
             parameters[24].Value = model.AllBackMoney;
             parameters[25].Value = model.AllPay;
             parameters[26].Value = model.InCome;
             parameters[27].Value = model.Note;
             parameters[28].Value = model.id;

             int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
             if (rows > 0)
             {
                 return true;
             }
             else
             {
                 return false;
             }
         }

         /// <summary>
         /// 删除一条数据
         /// </summary>
         public bool Delete(long id)
         {

             StringBuilder strSql = new StringBuilder();
             strSql.Append("delete from TJ_SellInfoByYear ");
             strSql.Append(" where id=@id");
             SqlParameter[] parameters = {
					new SqlParameter("@id", SqlDbType.BigInt)
			};
             parameters[0].Value = id;

             int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
             if (rows > 0)
             {
                 return true;
             }
             else
             {
                 return false;
             }
         }
         /// <summary>
         /// 批量删除数据
         /// </summary>
         public bool DeleteList(string idlist)
         {
             StringBuilder strSql = new StringBuilder();
             strSql.Append("delete from TJ_SellInfoByYear ");
             strSql.Append(" where id in (" + idlist + ")  ");
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString());
             if (rows > 0)
             {
                 return true;
             }
             else
             {
                 return false;
             }
         }


         /// <summary>
         /// 得到一个对象实体
         /// </summary>
         public TJ_SellInfoByYear GetModel(long id)
         {

             StringBuilder strSql = new StringBuilder();
             strSql.Append("select  top 1 id,ShopID,StatYear,SellNum,SellMoney,SellInCome,SellBackNum,SellBackMoney,SellPay,LargeNum,LargeMoney,LargeInCome,LargeBackOrderNum,LargeBackOrderMoney,LargePay,SendNum,SendMoney,SendInCome,SendBackNum,SendBackMoney,SendPay,TempOrderNum,TempOrderMoney,AllOrderMoney,AllInCome,AllBackMoney,AllPay,InCome,Note from TJ_SellInfoByYear ");
             strSql.Append(" where id=@id");
             SqlParameter[] parameters = {
					new SqlParameter("@id", SqlDbType.BigInt)
			};
             parameters[0].Value = id;

             TJ_SellInfoByYear model = new TJ_SellInfoByYear();
             DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
             if (ds.Tables[0].Rows.Count > 0)
             {
                 return DataRowToModel(ds.Tables[0].Rows[0]);
             }
             else
             {
                 return null;
             }
         }


         /// <summary>
         /// 得到一个对象实体
         /// </summary>
         public TJ_SellInfoByYear DataRowToModel(DataRow row)
         {
             TJ_SellInfoByYear model = new TJ_SellInfoByYear();
             if (row != null)
             {
                 if (row["id"] != null && row["id"].ToString() != "")
                 {
                     model.id = long.Parse(row["id"].ToString());
                 }
                 if (row["ShopID"] != null && row["ShopID"].ToString() != "")
                 {
                     model.ShopID = int.Parse(row["ShopID"].ToString());
                 }
                 if (row["StatYear"] != null)
                 {
                     model.StatYear = row["StatYear"].ToString();
                 }
                 if (row["SellNum"] != null && row["SellNum"].ToString() != "")
                 {
                     model.SellNum = int.Parse(row["SellNum"].ToString());
                 }
                 if (row["SellMoney"] != null && row["SellMoney"].ToString() != "")
                 {
                     model.SellMoney = decimal.Parse(row["SellMoney"].ToString());
                 }
                 if (row["SellInCome"] != null && row["SellInCome"].ToString() != "")
                 {
                     model.SellInCome = decimal.Parse(row["SellInCome"].ToString());
                 }
                 if (row["SellBackNum"] != null && row["SellBackNum"].ToString() != "")
                 {
                     model.SellBackNum = int.Parse(row["SellBackNum"].ToString());
                 }
                 if (row["SellBackMoney"] != null && row["SellBackMoney"].ToString() != "")
                 {
                     model.SellBackMoney = decimal.Parse(row["SellBackMoney"].ToString());
                 }
                 if (row["SellPay"] != null && row["SellPay"].ToString() != "")
                 {
                     model.SellPay = decimal.Parse(row["SellPay"].ToString());
                 }
                 if (row["LargeNum"] != null && row["LargeNum"].ToString() != "")
                 {
                     model.LargeNum = int.Parse(row["LargeNum"].ToString());
                 }
                 if (row["LargeMoney"] != null && row["LargeMoney"].ToString() != "")
                 {
                     model.LargeMoney = decimal.Parse(row["LargeMoney"].ToString());
                 }
                 if (row["LargeInCome"] != null && row["LargeInCome"].ToString() != "")
                 {
                     model.LargeInCome = decimal.Parse(row["LargeInCome"].ToString());
                 }
                 if (row["LargeBackOrderNum"] != null && row["LargeBackOrderNum"].ToString() != "")
                 {
                     model.LargeBackOrderNum = int.Parse(row["LargeBackOrderNum"].ToString());
                 }
                 if (row["LargeBackOrderMoney"] != null && row["LargeBackOrderMoney"].ToString() != "")
                 {
                     model.LargeBackOrderMoney = decimal.Parse(row["LargeBackOrderMoney"].ToString());
                 }
                 if (row["LargePay"] != null && row["LargePay"].ToString() != "")
                 {
                     model.LargePay = decimal.Parse(row["LargePay"].ToString());
                 }
                 if (row["SendNum"] != null && row["SendNum"].ToString() != "")
                 {
                     model.SendNum = int.Parse(row["SendNum"].ToString());
                 }
                 if (row["SendMoney"] != null && row["SendMoney"].ToString() != "")
                 {
                     model.SendMoney = decimal.Parse(row["SendMoney"].ToString());
                 }
                 if (row["SendInCome"] != null && row["SendInCome"].ToString() != "")
                 {
                     model.SendInCome = decimal.Parse(row["SendInCome"].ToString());
                 }
                 if (row["SendBackNum"] != null && row["SendBackNum"].ToString() != "")
                 {
                     model.SendBackNum = int.Parse(row["SendBackNum"].ToString());
                 }
                 if (row["SendBackMoney"] != null && row["SendBackMoney"].ToString() != "")
                 {
                     model.SendBackMoney = decimal.Parse(row["SendBackMoney"].ToString());
                 }
                 if (row["SendPay"] != null && row["SendPay"].ToString() != "")
                 {
                     model.SendPay = decimal.Parse(row["SendPay"].ToString());
                 }
                 if (row["TempOrderNum"] != null && row["TempOrderNum"].ToString() != "")
                 {
                     model.TempOrderNum = int.Parse(row["TempOrderNum"].ToString());
                 }
                 if (row["TempOrderMoney"] != null && row["TempOrderMoney"].ToString() != "")
                 {
                     model.TempOrderMoney = decimal.Parse(row["TempOrderMoney"].ToString());
                 }
                 if (row["AllOrderMoney"] != null && row["AllOrderMoney"].ToString() != "")
                 {
                     model.AllOrderMoney = decimal.Parse(row["AllOrderMoney"].ToString());
                 }
                 if (row["AllInCome"] != null && row["AllInCome"].ToString() != "")
                 {
                     model.AllInCome = decimal.Parse(row["AllInCome"].ToString());
                 }
                 if (row["AllBackMoney"] != null && row["AllBackMoney"].ToString() != "")
                 {
                     model.AllBackMoney = decimal.Parse(row["AllBackMoney"].ToString());
                 }
                 if (row["AllPay"] != null && row["AllPay"].ToString() != "")
                 {
                     model.AllPay = decimal.Parse(row["AllPay"].ToString());
                 }
                 if (row["InCome"] != null && row["InCome"].ToString() != "")
                 {
                     model.InCome = decimal.Parse(row["InCome"].ToString());
                 }
                 if (row["Note"] != null)
                 {
                     model.Note = row["Note"].ToString();
                 }
             }
             return model;
         }

         /// <summary>
         /// 获得数据列表
         /// </summary>
         public DataSet GetList(string strWhere)
         {
             StringBuilder strSql = new StringBuilder();
             strSql.Append("select id,ShopID,StatYear,SellNum,SellMoney,SellInCome,SellBackNum,SellBackMoney,SellPay,LargeNum,LargeMoney,LargeInCome,LargeBackOrderNum,LargeBackOrderMoney,LargePay,SendNum,SendMoney,SendInCome,SendBackNum,SendBackMoney,SendPay,TempOrderNum,TempOrderMoney,AllOrderMoney,AllInCome,AllBackMoney,AllPay,InCome,Note ");
             strSql.Append(" FROM TJ_SellInfoByYear ");
             if (strWhere.Trim() != "")
             {
                 strSql.Append(" where " + strWhere);
             }
             return DbHelperSQL.Query(strSql.ToString());
         }

         /// <summary>
         /// 获得前几行数据
         /// </summary>
         public DataSet GetList(int Top, string strWhere, string filedOrder)
         {
             StringBuilder strSql = new StringBuilder();
             strSql.Append("select ");
             if (Top > 0)
             {
                 strSql.Append(" top " + Top.ToString());
             }
             strSql.Append(" id,ShopID,StatYear,SellNum,SellMoney,SellInCome,SellBackNum,SellBackMoney,SellPay,LargeNum,LargeMoney,LargeInCome,LargeBackOrderNum,LargeBackOrderMoney,LargePay,SendNum,SendMoney,SendInCome,SendBackNum,SendBackMoney,SendPay,TempOrderNum,TempOrderMoney,AllOrderMoney,AllInCome,AllBackMoney,AllPay,InCome,Note ");
             strSql.Append(" FROM TJ_SellInfoByYear ");
             if (strWhere.Trim() != "")
             {
                 strSql.Append(" where " + strWhere);
             }
             strSql.Append(" order by " + filedOrder);
             return DbHelperSQL.Query(strSql.ToString());
         }

         /// <summary>
         /// 获取记录总数
         /// </summary>
         public int GetRecordCount(string strWhere)
         {
             StringBuilder strSql = new StringBuilder();
             strSql.Append("select count(1) FROM TJ_SellInfoByYear ");
             if (strWhere.Trim() != "")
             {
                 strSql.Append(" where " + strWhere);
             }
             object obj = DbHelperSQL.GetSingle(strSql.ToString());
             if (obj == null)
             {
                 return 0;
             }
             else
             {
                 return Convert.ToInt32(obj);
             }
         }
         /// <summary>
         /// 分页获取数据列表
         /// </summary>
         public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
         {
             StringBuilder strSql = new StringBuilder();
             strSql.Append("SELECT * FROM ( ");
             strSql.Append(" SELECT ROW_NUMBER() OVER (");
             if (!string.IsNullOrEmpty(orderby.Trim()))
             {
                 strSql.Append("order by T." + orderby);
             }
             else
             {
                 strSql.Append("order by T.id desc");
             }
             strSql.Append(")AS Row, T.*  from TJ_SellInfoByYear T ");
             if (!string.IsNullOrEmpty(strWhere.Trim()))
             {
                 strSql.Append(" WHERE " + strWhere);
             }
             strSql.Append(" ) TT");
             strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
             return DbHelperSQL.Query(strSql.ToString());
         }

         /*
         /// <summary>
         /// 分页获取数据列表
         /// </summary>
         public DataSet GetList(int PageSize,int PageIndex,string strWhere)
         {
             SqlParameter[] parameters = {
                     new SqlParameter("@tblName", SqlDbType.VarChar, 255),
                     new SqlParameter("@fldName", SqlDbType.VarChar, 255),
                     new SqlParameter("@PageSize", SqlDbType.Int),
                     new SqlParameter("@PageIndex", SqlDbType.Int),
                     new SqlParameter("@IsReCount", SqlDbType.Bit),
                     new SqlParameter("@OrderType", SqlDbType.Bit),
                     new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
                     };
             parameters[0].Value = "TJ_SellInfoByYear";
             parameters[1].Value = "id";
             parameters[2].Value = PageSize;
             parameters[3].Value = PageIndex;
             parameters[4].Value = 0;
             parameters[5].Value = 0;
             parameters[6].Value = strWhere;	
             return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
         }*/

         #endregion  BasicMethod
		#region  MethodEx
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public TJ_SellInfoByYear GetModelbyShopID(int ShopID)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select  top 1  ");
            strSql.Append("  id,ShopID,StatYear,SellNum,SellMoney,SellInCome,SellBackNum,SellBackMoney,SellPay,LargeNum,LargeMoney,LargeInCome,LargeBackOrderNum,LargeBackOrderMoney,LargePay,SendNum,SendMoney,SendInCome,SendBackNum,SendBackMoney,SendPay,TempOrderNum,TempOrderMoney,AllOrderMoney,AllInCome,AllBackMoney,AllPay,InCome,Note ");
            strSql.Append(" from TJ_SellInfoByYear ");
            strSql.Append(" where ShopID=" + ShopID + " order by id desc");
            TJ_SellInfoByYear model = new TJ_SellInfoByYear();
            DataSet ds = DbHelperSQL.Query(strSql.ToString());
            if (ds.Tables[0].Rows.Count > 0)
            {
                return DataRowToModel(ds.Tables[0].Rows[0]);
            }
            else
            {
                return null;
            }
        }
		#endregion  MethodEx
	}
}

